﻿using System.ComponentModel.DataAnnotations;
using Lari.Configuration;

namespace Lari.Services.ViewModel
{
    public class StateModel
    {
        [StringLength(2, ErrorMessage = MessageCode.Generic.LengthExceeded)]
        [Required(ErrorMessage = MessageCode.Generic.ReguiredFldMsg)]
        [RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = MessageCode.Generic.InvalidData)]
        public string Code
        {
            get;
            set;
        }

        [StringLength(30, ErrorMessage = MessageCode.Generic.LengthExceeded)]
        [Required(ErrorMessage = MessageCode.Generic.ReguiredFldMsg)]
        public string Name
        {
            get;
            set;
        }

        public bool IsDefault
        {
            get;
            set;
        }
    }
}
